using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Threading;
using Avalonia.VisualTree;
using Lottie.Avalonia;
using Prism.Navigation.Regions;

namespace JMClient.Views;
public partial class HomeView : UserControl, IRegionMemberLifetime, INavigationAware
{
    private const string AnimationPath = "avares://JMClient/Assets/Animations/me_at_office.json";
    private const string DummyPath = "avares://JMClient/Assets/Animations/loading.json"; // 一个简单的加载动画或空动画
    private readonly object _animationLock = new object();
 

    public HomeView()
    {
        InitializeComponent();

    }

    public bool KeepAlive => true;
    public bool IsNavigationTarget(NavigationContext navigationContext) => true;

    public void OnNavigatedTo(NavigationContext navigationContext)
    {
        Console.WriteLine("🔄 导航到HomeView");
 
    }

    public void OnNavigatedFrom(NavigationContext navigationContext)
    {
        Console.WriteLine("🔄 离开HomeView");
 
    }
 

    private void Button_OnClick(object? sender, RoutedEventArgs e)
    {
 
    }

    
}